<?php
    $dp = new jDatePicker();
    $dp->__dateFormat = "yy-mm-dd";
    echo "<scr"."ipt type=\"text/javascript\">";
    $dp->generateDP("tanggal_kb");
    echo "</scr"."ipt>";
    $dp->init();
    ?>
    
    <?php
    ?>
    <h3 class="title-popup">Form <?php echo ($kode==""?"Tambah":"Ubah"); ?> Kas Bank</h3>

    <form action="" method="post" onsubmit="return save()" enctype="multipart/form-data">
<?php
    if($msg!="") {
?>
    <div class="BoxMessage Warning">Proses Gagal, <br /><?php echo $msg;?></div>
<?php
    }

?>

    <fieldset class="fldInput">

    <dl>
   
     <dt class="mandatory">Bank </dt>
    <dd>
        <input class="read-only" type="text" name="nama_bank" id="nama_bank" value="<?php echo $nama_bank;?>" maxlength="40" size="50" readonly="readonly" />
        <input type="hidden" name="id_bank" id="id_bank" value="<?php echo $id_bank;?>"   />
        <?php //echo $gbbank; 
        ?>

    </dd>
    
    <dt class="mandatory">Tanggal</dt>
    <dd><input class="read-only" type="text" name="tanggal_kb" id="tanggal_kb" value="<?php echo $tanggal_kb;?>" maxlength="10" size="10" readonly="readonly"  /></dd>
    
    <dt>Kas Masuk</dt>
    <dd><input type="text" name="kas_masuk_kb" id="kas_masuk_kb" value="<?php echo $kas_masuk_kb;?>" maxlength="40" size="30" /></dd>
    
    <dt>Kas Keluar</dt>
    <dd><input type="text" name="kas_keluar_kb" id="kas_keluar_kb" value="<?php echo $kas_keluar_kb;?>" maxlength="40" size="30" /></dd>
    
    <dt>Keterangan</dt>
    <dd><textarea name="keterangan" id="keterangan" rows="3" cols="40" ><?php echo $keterangan;?></textarea></dd>
    
    
    <dt>&nbsp;</dt>
    <dd>
        <ul id="note">
            <li>Field dengan remark harus diisi.</li>
            <li>Gunakan tombol Cari untuk field dengan property read-only.</li>
        </ul>
    </dd>
    </dl>
    </fieldset>
    <div id="box-control-save">
    <input type="hidden" name="vSave" id="vSave" value="1" />
    <input type="hidden" name="kode" id="kode" value="<?php echo $kode?>" />
    <input type="hidden" name="vMode" value="<?php echo ($kode=="0"?"add":"edit"); ?>" />
    <input type="submit" class="CommandButton" name="btnSimpan" value="Save"/>&nbsp;
    <input type="button" class="CommandButton" value="Cancel" onclick="javascript:closeGB_();"/>
    </div>
    </form>
    
<script type="text/javascript">
    
    function closeGB_ (){
            <?php echo CloseGB(true);?>
    }

    function trimValue(str){
            var out = "";
            out = str.replace(/^\s+|\s+$/g,"");
            return out;
    }

    function _obj_fSendValue(kode, nama, elmKode, elmNama) {
            var elmk = document.getElementById("" + elmKode + "");
            var elmn = document.getElementById("" + elmNama + "");
            try {
                    elmk.value = kode;
                    elmn.value = nama;
            }
            catch(e) {
                    alert(e.message);
            }
    }



</script>
